<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class BackUsersRole extends Model
{
    use HasFactory;

    protected $table = 'zfm_usersRole';


    // UserRole 模型中定义与 User 模型、Role 模型的多对多关系

    public function user()
    {
        return $this->belongsTo(User::class);
    }

    public function role()
    {
        return $this->belongsTo(BackRole::class);
    }
}
